package com.test.ds.link.linklist2;

public class LinkListApp2 {
	public static void main(String[] args){
		LinkList theList = new LinkList();
		
		theList.inserFirst(22, 2.99);
		theList.inserFirst(44, 4.99);
		theList.inserFirst(66, 6.99);
		theList.inserFirst(88, 8.99);
		
		theList.displayList();
		
		Link f = theList.find(44);
		if(f != null){
			System.out.println("Found link with key " + f.iData);
		}else{
			System.out.println("Can't find link");
		}
		
		Link d = theList.delete(66);
		if(d != null){
			System.out.println("Deleted link with key " + d.iData);
		}else{
			System.out.println("Can't delete link " );
		}
		theList.displayList();
	}
}
